package com.xjtu.platform.user.admin.statistics.dao;

import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;

import java.util.List;

/**
 * @创建人 MBY381
 * @创建时间 2022/7/6 19:57
 * @描述 暂无
 */


@Mapper
public interface StatDao {



    @Select("select distinct visit_id from first_visit where status='finish'")
    List<String> findALLItems();


    @Select("Select comment from consult where visit_id=#{visit_id} and state=4")
    String findFileName(@Param("visit_id") String visit_id);

    @Select("select count(*) from first_visit where status != 'finish'")
    int getActiveVisitNum();

    @Select("select count(*) from consult where state != 0 or 1")
    int getTotalConsultNum();

    @Select("select count(a.user_id) from user as a,user_role as b where a.user_id=b.user_id and b.role_id='student'")
    int getTotalUserNum();

    @Select("select count(*) from first_visit")
    int getTotalVisitNum();
}
